﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DesignPattern.AdapterPattern02
{
    public class AdapterPatternDemo2
    {

        public static void Run()
        {

            Console.WriteLine("适配器模式");
            IAdvancedMediaPlayer AdvancedMediaPlayer = new Mp4Player();
            MediaAdapter MediaAdapter = new MediaAdapter(AdvancedMediaPlayer);
            MediaAdapter.Play();

            AdvancedMediaPlayer = new VlcPlayer();
            MediaAdapter = new MediaAdapter(AdvancedMediaPlayer);
            MediaAdapter.Play();

        }
    }

}
